library AutoRankSet initializer init requires LegacySystem


	private function RankSetter takes nothing returns boolean
		local integer i = 1
		loop
			loop 
				exitwhen i>udg_InitialPlayers
				call RankSet(udg_Sorted[i], false)
				set i=i+1
			endloop
		endloop
		return false
	endfunction
	
	private function init takes nothing returns nothing
		local trigger t = CreateTrigger()
		call TriggerRegisterTimerEvent(t, 10.0, true)
		call TriggerAddCondition(t, Condition(function RankSetter))
		set t = null
	endfunction
	

		
endlibrary